package com.yourenbang.lingyun.transaction.web.domain.po;

import com.yourenbang.lingyun.core.util.json.ToJSON;
import com.yourenbang.lingyun.transaction.constant.JournalStatus;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class FundAccountJournal implements Serializable, ToJSON {

    public FundAccountJournal() {
    }

    public FundAccountJournal(Short platNo) {
        this.platNo = platNo;
    }

    private Integer fundAccountJournalId;

    private Integer fundAccountChangePlanId;

    /**
     *   资金变动账户
     */
    private Integer fundAccountId;

    /**
     *   资金明细状态
     * @see JournalStatus
     */
    private Short journalStatus;

    private BigDecimal journalChangeValue;

    /**
     *   资金变动对应的业务唯一paymentid,一般情况下和change_plan的order_id保持一致
     */
    private String accountJournalAcid;

    /**
     *   收入资金变动金额，默认为0
     */
    private BigDecimal accountIncome;

    /**
     *   冻结资金变动收入，默认为0
     */
    private BigDecimal accountAmountFrozen;

    /**
     *   可提现资金变动收入，默认为0
     */
    private BigDecimal accountAmountWithdrawable;

    /**
     *   已提现资金变动收入，默认为0
     */
    private BigDecimal accountAmountWithdrawed;

    /**
     *   不可提现资金变动收入，默认为0
     */
    private BigDecimal accountAmountUndepositable;

    /**
     *   收入变动前的金额
     */
    private BigDecimal accountIncomeBefore;

    /**
     *   收入变动后的金额
     */
    private BigDecimal accountIncomeAfterwards;

    /**
     *   冻结资金变化前金额
     */
    private BigDecimal accountAmountFrozenBefore;

    /**
     *   冻结资金变化后金额
     */
    private BigDecimal accountAmountFrozenAfterwards;

    /**
     *   可提现金额变化前金额
     */
    private BigDecimal accountAmountWithdrawableBefore;

    /**
     *   可提现金额变化后金额
     */
    private BigDecimal accountAmountWithdrawableAfterwards;

    /**
     *   已提现金额变化前金额
     */
    private BigDecimal accountAmountWithdrawedBefore;

    /**
     *   已填现金额变化后金额
     */
    private BigDecimal accountAmountWithdrawedAfterwards;

    /**
     *   不可提现金额变化前金额
     */
    private BigDecimal accountAmountUndepositableBefore;

    /**
     *   不可提现金额变化后金额
     */
    private BigDecimal accountAmountUndepositableAfterwards;

    /**
     *   渠道 100 渠道缺失 200 mpos 300 epos
     */
    private Short channelId;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    /**
     * 资金类型，三位数字，eg: 320，330，360
     */
    private Integer accountMainJournalType;
    /**
     * 资金类型名称，eg:激活奖励，达标奖励，活动奖励
     */
    private String accountMainJournalTypeName;
    /**
     *   -1 删除 1 正常
     */
    private Byte isDel;

    /****** 非数据库字段 ******/
    private Short platNo;

}
